<!DOCTYPE html>
<html>
<body>
<div contenteditable id="root"><span id="wrapper">First line<br>Second line</span></div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
Markup.description("This sets the selection to the end of the first line, and hits the enter key.\n"
    + "Expected behavior: a div is created around the second line, and the cursor is placed at the "
    + "start of the second line. See bug 61594.");
var sel = window.getSelection();
sel.collapse(document.getElementById("wrapper"), 1);
document.execCommand("InsertParagraph", false, null);
Markup.dump(root);
</script>
</html>
